home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 7
/
Aminet 7 - August 1995.iso
/
Aminet
/
util
/
dtype
/
JpegDataType.lha
/
JPEG.datatype.install
< prev
next >
Wrap
Text File
|
1993-07-29
|
3KB
|
123 lines
; JPEG Datatype Installer Script
; $VER: JPEG.datatype.install 39.1 (28/07/93)
;
; First make sure we have WB3.0
(set @default-dest "")
(if (< (/ (getversion) 65536) 39)
(
(abort "You must have at least Workbench 3.0")
))
; Now check for at least a 68020 processor
(set proc (database "cpu"))
(if (OR (= proc "68000") (= proc "68010"))
(
(abort "You must have at least a 68020 processor")
))
; Check that the datatypes directory exists
(if (NOT (exists "SYS:classes/datatypes"))
(
(abort "Can't find the SYS:classes/datatypes directory")
))
; Copy the datatype to it
(copyfiles
(prompt "")
(help @copyfiles-help)
(source "JPEG.datatype")
(dest "SYS:classes/datatypes")
)
; Find out what sort of installation this is
(set choice (askchoice
(prompt "Install as permanently enabled, or manually selectable")
(choices "Permanently enabled" "Manual select")
(help
(cat "The datatype can be installed as permanently enabled, or"
" manually selectable.\n\n"
"Pemanently enabled means that the datatype is always ready for use.\n"
"Manually Selectable means that the datatype has to be run before"
"it can be used. Once it has been run, it remains installed until "
"the computer is rebooted."))
))
(if (= choice 0)
(
; Permanent installation
; Check that the datatypes directory exists
(if (NOT (exists "DEVS:datatypes"))
(
(abort "Can't find the DEVS:datatypes directory")
))
; Copy the datatype to it
(copyfiles
(prompt "")
(help @copyfiles-help)
(source "JPEG")
(infos)
(dest "DEVS:datatypes")
)
)
(
; Manual installation
; Check that the storage directory exists
(if (NOT (exists "SYS:Storage/datatypes"))
(
(abort "Can't find the SYS:Storage/Datatypes directory")
))
; Copy the datatype to it
(copyfiles
(prompt "")
(help @copyfiles-help)
(source "JPEG")
(infos)
(dest "SYS:Storage/Datatypes")
)
))
; Now ask for somewhere to assign JPEGTMP:
(set temp_location (askdir
(prompt "You can optionally select a location for JPEGTMP.")
(default "RAM:")
(help
(cat "Some JPEGs may require extra disk space while decoding. JPEGTMP "
" is a assignment that will tell the datatype where it can store "
"its temporary files. Ideally, it should be located on hard disk, "
"but you can use RAM disk if you have plenty of RAM.\n\n"
"This step is optional, but you are advised to supply a location. "
))
))
; If a directory was selected, put it in the user-startup file
(startup "JPEG Datatype"
(prompt "Do you want the JPEGTMP assignment put in your user-startup?")
(help
(cat "You are advised to put the JPEGTMP assignment in your user-startup "
"file, otherwise you will have problems decoding certain JPEGs."
))
(command "assign JPEGTMP: " temp_location)
)
; and perform the assign
(makeassign "JPEGTMP" temp_location)
; Now exit, telling them what the situation is
(if (= choice 0)
(
; Installation was permanent
(exit
(cat "You will have to reboot the system before you can use the "
"JPEG datatype."
))
)
(
; Installation was manual
(exit
(cat "You must double-click on the JPEG icon in the Storage->Datatypes "
"drawer on your Workench disk in order to use the JPEG datatype. "
"The datatype will then be available for use until you reboot."
))
))